<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ page session="false"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

    <head>
    	<!--ExtJS imports  -->
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <link rel="stylesheet" href="<spring:url value='/scripts/ext3/resources/css/ext-all.css'/>" type="text/css" media="all" />
        <script type="text/javascript" src="<spring:url value='/scripts/ext3/adapter/ext/ext-base.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/ext3/ext-all-debug.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/ext3/examples/ux/CheckColumn.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/ext3/examples/ux/MultiSelect.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/ext3/examples/ux/RowExpander.js'/>"></script>
        
		
        <!-- Header imports -->
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/NewHeader.js'/>"></script>
        
        <!-- Common imports -->
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/ColumnModel.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/commons/actions.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/commons/extutil/ComboUtils.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/commons/extutil/FormUtils.js'/>"></script>
        <!-- 
		<script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/ViewUploadDocWin.js'/>"></script>
		-->   
		<script type="text/javascript" src="<spring:url value='/scripts/ext3/examples/ux/RowEditor.js'/>"></script>     
        
        
        <!-- Lead related imports -->
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/LeadOpp.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/FileUploader.js'/>"></script>
		<script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/Search.js'/>"></script>
		<script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/sales/lead/LeadDashBoard.js'/>"></script>
		<script type="text/javascript" src="<spring:url value='/scripts/ext3/examples/ux/RowEditor.js'/>"></script>        
		<script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/Search.js'/>"></script> 
		<script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/sales/lead/LeadDashBoard.js'/>"></script>         
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/sales/lead/LeadChart.js'/>"></script>  
       
        <!-- Activity related imports -->
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/ActivitySearch.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/ActivityForm.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/ContactForm.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/sales/activity/MyActivity.js'/>"></script>
        
        <!-- Opportunity related imports -->
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/OpportunitySearch.js'/>"></script>
        
        <!-- Report related imports -->
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/ReportMenu.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/PrintActivity.js'/>"></script>
		<script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/PrintOpportunity.js'/>"></script>
		<script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/ActivityDynamicSearch.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/OpportunityDynamicSearch.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/OpportunitySearch.js'/>"></script>
        
        <!-- Admin related imports -->
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/user/UserInfoDetails.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/user/permission.js'/>"></script>
		<script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/admin/Setups.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/admin/UserManager.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/admin/PermissionMain.js'/>"></script>        
        
        <!-- Project related imports -->
        
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ProjectModule.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/Project.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ProjectReport.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ProjectIssues.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/IssueUpdate.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ProjectSearch.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ExternalMember.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ProjectMember.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/taskModule.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/projecttask.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ProjectFileUploader.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/issue/IssueModule.js'/>"></script>
        <!-- 
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/issue/IssueDashboard.js'/>"></script>
        -->
 		<script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/task/TaskUpdate.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ProjectMember.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ProjectModule.js'/>"></script> 
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/IssueDashboard.js'/>"></script> 
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/issue/IssueModule.js'/>"></script> 
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/issue/IssueDetails.js'/>"></script>              
 
        
        <!-- Tab level modules imports -->
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/sales/lead.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/sales/customer.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/sales/activity.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/sales/opportunity.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/sales/report.js'/>"></script>
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/salescalender.js'/>"></script>
        
        <script type="text/javascript" src="<spring:url value='/scripts/CRM/SPComp/project/ProjectModule.js'/>"></script>         
         <title>Customer Relationship Management System</title>
         
        <style type="text/css"> 
        .icon-grid {
           background-image:url(../images/Grid-icon.png) !important; -->
            }
         .MyIssueIcon{ 
           background-image: url(../images/user.png) !important;
         }
         
         .Issue{
           background-image: url(../images/issue.png) !important; 
         }
         
         .AddIssues{
            background-image: url(../images/AddIssue.jpeg) !important;  
         }
         .AddComment{
         background-image: url( '../images/Comment.jpeg')
         }
        .lead_user_image {
        	background-image: url(../images/user.png) !important;
        }
        .form-title-icon {
        	background-image: url(../images/user.png) !important;
        }
        .add-icon {
        	background-image: url(../images/user.png) !important
        }
		</style>
		 
		
<script type="text/javascript">
        
		
        Ext.onReady(function(){
            var applicationMainPanel = new Ext.Panel({
                //renderTo    : Ext.getBody(),
                renderTo	: 'rootContainer',
                id          : 'applicationMainPanel',
                height      : 600,
                width   	: 1100,
                frame       : false,
                layout      : 'anchor',
                items       : [	
                               CRM.SPComp.createNewHeader()
                              ]
            });

        });
 
   		
        function createRequestObject(){
        	var req;
        	if(window.XMLHttpRequest){//For Firefox, Safari, Opera
        		req = new XMLHttpRequest();
        	}
        	else if(window.ActiveXObject){//For IE 5+
        		req = new ActiveXObject("Microsoft.XMLHTTP");
        	}
        	else{//Error for an old browser
        		alert('Your browser is not IE 5 or higher, or Firefox or Safari or Opera');
        	}
        	return req;
       	}

        	//Make the XMLHttpRequest Object
       	var http = createRequestObject();

       	function sendRequest(method, url){
        	if(method == 'get' || method == 'GET'){
	        	http.open(method,url);
    	    	http.onreadystatechange = handleResponse;
        		http.send(null);
        	}
        }

        function handleResponse(){
        	if(http.readyState == 4 && http.status == 200){
        		var responseData = http.responseText;
        		var userDetails = responseData.substring(9, responseData.length-22);
        		var finalResponse = "<font face='verdana' color='white' size=2>"+
        						userDetails+
        						"&nbsp|&nbsp<a href='logout'>Logout</a> &nbsp&nbsp";
        		if(finalResponse){
        			document.getElementById('userDetailsContainer').innerHTML = finalResponse;
        		}
        	}      
        }
       </script>
     </head>
      
     
     <body alink="yellow" vlink="white" bgcolor="#A8C6EA">
     		<table align="center" width="1100" cellpadding="0" cellspacing="0" border="0">
     			<tr width="100%" bgcolor="#336699" height="30">
     				<td id="userDetailsContainer" align="right" >
     					<font face='verdana' size='1' color='white'>
    						<a href="logout">Logout</a> 
     					</font>
     					&nbsp&nbsp
     				</td>
     			</tr>
     			<tr>
     				<td id='rootContainer'></td>
     			</tr>
     			<tr>
     				<td align="right" bgcolor="#336699" height="30">
     					<font face='verdana' size='1' color='white'>
     						Powered By: SourcePundit InfoSystem (P) Ltd. 
     					</font>
     					&nbsp&nbsp
     				</td>
     			</tr>
     		</table>
     		<script type="text/javascript">
     			sendRequest('GET','home/loginDetails');
     		</script>
     </body>
</html>
